using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QLNhaSach.GUI.NhanVienBanSach
{
    public partial class NVBanSach : Form
    {
        public int manvbansach;
        public NVBanSach()
        {
            InitializeComponent();
        }

        private void CloseAllChildForm()
        {
            Form[] frm = this.MdiChildren;
            for (int i = 0; i < frm.Length; i++)
            {
                frm[i].Close();
            }
        }

        private void NhanVienBanSach_Load(object sender, EventArgs e)
        {
            btnTTCaNhan_Click(sender, e);
        }

        private void btnTTCaNhan_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            ThongTinCaNhan fmThongTinCaNhan = new ThongTinCaNhan();
            fmThongTinCaNhan.manvChilder = manvbansach;
            fmThongTinCaNhan.MdiParent = this;
            fmThongTinCaNhan.Show();

        }

        private void btnQLSach_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            LapHoaDonBanHang fmLapHoaDonBanHang = new LapHoaDonBanHang();
            fmLapHoaDonBanHang.maNV = manvbansach;
            fmLapHoaDonBanHang.MdiParent = this;
            fmLapHoaDonBanHang.Show();
        }

        private void buttonX3_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            TimKiemSach fmTimKiemSach = new TimKiemSach();
            fmTimKiemSach.MdiParent = this;
            fmTimKiemSach.Show();

        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            DangXuat fmDangXuat = new DangXuat();
            fmDangXuat.maNV = manvbansach;
            fmDangXuat.MdiParent = this;
            fmDangXuat.Show();
        }

    }
}